#include <stdio.h>
#include <time.h>
#include <unistd.h>

int main(int argc, char *argv)
{
    time_t seconds;
    struct tm *local_time;

    time(&seconds);
    local_time = localtime(&seconds);

    printf("first current time is %02d:%02d:%02d\r\n", local_time->tm_hour, local_time->tm_min, local_time->tm_sec);

    sleep(5);

    time(&seconds);
    local_time = localtime(&seconds);
    printf("second current time is %02d:%02d:%02d\r\n", local_time->tm_hour, local_time->tm_min, local_time->tm_sec);

    return 0;
}